package com.idroc.message.impl;

import org.apache.mina.common.IoSession;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.idroc.message.Message;
import com.idroc.message.MessageHandler;
import com.idroc.message.MessageService;

public class NoopMessageHandler implements MessageHandler {
 
	private static final Logger log = LoggerFactory.getLogger(NoopMessageHandler.class);
	
	private MessageService service = null;
	 
	public void onAttached(MessageService service) {

		log.info("service:{}", service);	
		
		this.service = service;
	}

	public void onMsgReceived(IoSession s, Message message) { 
		
		NoopMessage msg = (NoopMessage)message;
		log.info("NoopMessage:{}", msg); 
	}

	public void onMsgSent(IoSession s, Message message) {
		NoopMessage msg = (NoopMessage)message;
		log.info("NoopMessage:{}", msg); 
	}

	public void onReleased(MessageService service) { 
		log.info("service:{}", service);
	}

	public void onMsgCast(IoSession s, Message message) {
		
	}
	 

}
